package br.com.sistema.controllers;

import br.com.sistema.views.LoginView;

public class LoginController {

	private LoginView view;
	
	public LoginController(){
		this.view = new LoginView(this);
	}
	
	public void login() throws Exception {
		try{
			if(this.view.usuario.getValue().equals("admin") && view.senha.getValue().equals("123456")){
				view.getComponent().close();
			}
		}catch(Exception ex){
			throw ex;
		}
	}
	
	public LoginView getView(){
		return view;
	}
	
}
